Fixed call to 'toJSON' in app.js
Moved note tests, added comments.