Proper template structure for all pages

A sensible naming and structure for all templates, fixing some bugs in
page generation, improviing the speed of static generating by not
loading the templates every time.