Reworking first half of template