Updated for use with PhoneGap Build