Cleanup code
Rest of templating engine