Modularized services

Created an editor service to handle editor related operations. Seperated
concerns from app.js to this service.