Repository uses UnitOfWork pattern now
More refactoring

Refactored all the stuff i refactored the last couple of days again.
Maybe tomorrow I'll refactor this stuff again because I want to do it
differently again... maybe I'll be done refactoring sometime but I doubt
it :(