refactor HTML stuff to html.coffee
add graph selection box to index view. TODO: make it work