move module definition into a new app.js
extract config into environment.js
remove unnecessary log function

The log function from plugins.js is better than this.
add some docs to this cryptic file

Hopefully this will serve until we can refactor this.
fix test data