Rearranging content and adding HTML snippet