sanitize code & trim xtra Cordova refs