Moves some things around in haml template code for safer execution