Major changes to library