Added functions to split text into tokens given a delimiter and join them back again