Refactored services module