Starting adding tests for services and continue refactoring