refactor JS for consistency with other plugins
handle creation of apps without app.json