Cleaning markup of doc