Tidying up phone gap initialisation.