total-js now working with rest service factory