Javascript Improvement

app.js:
detection if plugins are loaded -> subpages can now run without errors
without loading all js files