Unit of work added
Dependency injection added, some refactoring