Added some erb templates, fixed a few more bugs along the way :)