Re-factoring.
Updated PhoneGap version to 3.5.1.