Moved to support Cordova-cli, and fixed up some issues.