Fixed cordova path + code cleanup.