removes unecessary markup