implementations for vecorized and genericised clean and tokenise