Ensure "this" gets set properly inside app methods

Previously, the value of "this" inside onDeviceReady was not appomat.app.