Renamed some things for added clarity
Renames alerts.js to device.js. In the actual application there is more abstraction than is needed for this demo.
Clarified that this is for Pre PhoneGap 3