Removes unneeded newlines.