Tidied up templates