Cleaned up some of the JavaScript.
Added Javascript routing.