Added code contracts and specifications
Fixed repository issues, added repository tests
wrote tests