Refactor dependency injection in angular app