Refactored code to use the Collection model instead of several similar classes