Template directory etc revised