template improvements. cleaner style.