Added DI, Tests and a service definition