Moved drupalgap_deviceready() towards the top of the file.
Added common.inc.js to includes and makefile, and fixed it to meet jsdoc standards.