Updated split function to use a reference parameter rather than return a copy.
Converted 'convert' to use reference parameter rather than return a copy.