fixing bugs and making templates work correctly

* reorganize templates
* follow the html skeleton from gh-pages
* use a global updateable doc from the top Menu
* make textload.coffee return the results in the correct order