Making some small improvements so templating is easier.