implement requirejs
Service refactoring