PhoneGap: More changes plus bug fixes