More tweaks to improve template