First stab at JSON REST API.

Refactored app.rb into multiple files.
Shitty jQuery implementation to get the thing going again.
Moved JS into separate file.

Added rake tasks to create JS.
Added main.js
Added .js to gitignore