added collection support and a templating system in case I change the structure of things later