separate controller service and main files