tools.js: move to lib/tools

change isGlobal() to isGlobalOrUndefined()
models.js: move to lib/models
Application: end point submission takes now an id
editor.js: the editor app