Well, the templating code seems a bit heavy to me. Might be ok for now, but as we add code I'm afraid this is going to become very cumbersome?