Refactor: services and directives