Integration test for PhotoRepository created. Fixed bugs in related classes. Changed database schema.
Other minor style changes.