Refactoring the templates
Putting back in setmetatable for now