Added a templating system because you know -- complexity makes it gooder