Notes on templating and controllers