add app.toJSON()
fix inspection of app. Closes #108