Split template, rearrange some markup