Major refactoring of services, models and factories