Template improvements