Added Main code and resources to make this a PhoneGap App