Collections class refactored to repository class
Huge code clean up