Refactored services, upgraded to rails 4