refactored services, cleaned up a bit