took factories out of controller files.