Moving logic out of services controller