Remove the memory allocation caused by the split function

This is step one. Removing the extra unnecessary stuff related
to the parseSurface function also showed some redundant
initialization that could be removed.