Split function now builds string directly, instead of pushing words to array first.