Few classes Refactored

* EntityManager usage refactored
* PhotoResizer created
* test database created