cleaned up for phonegap build