Cleaner templating

This style of templating has the same effect as before, but its a bit
easier to read.