Rewrote template