Trying to mimic btapp.js in angularjs service and provide a clean service interface.