Some validation fixes and tidied up indents in templates