Refactored app.js to make more sense.

Also fixed bug with REST parameters and renamed resolver to renderer.
Added ignore trailingslash and new view for test.