lots of refactors. stuck on templating issue with handlebars and haml.