Some refactoring to make things more testable
Changed test project name and added a few tests.