how were libraries built