More clean rm trailing spaces funcion