Template & variable reformatting