updated names to be more readable
Refactored service.js