More refactoring

More refactoring of the framework-project to get rid of all the static
services, instances of the DB-object, etc. Still does not compile and is
still a shitload of work...
Added generic repository

Added a generic repository for easier data access plus test cases.
Neither the repository, nor the testcases are completed (not even
close).