Tidied up the base template a bit