separated angular factory, controllers and config