Refactored the Collections library.