Windows service working but need more tests and refactoring