remove random whitespace and unnecessary done callbacks