First DB Test works

worked on Testproject and cleand up code so it becomes unit testable.