added a lot of initial stuff

 not sure if refs work until base.html is wired through