Move JS to external file and include JQuery
Make the javascript use JQuery
Organise the directory structure a bit better
Move markup out of the javascript
Use Sinatra!