Fixes bugs in the CollectionService, and added proper testing