variable fixes and beginnings of Mustache templating