Fixed usage of Q in MyApp.js and SmartApp.js