Update template.latex

This should hopefully eliminate spacing before and after subsections