refactored the service names and use commonJs pattern