spearmint: Mark code clean up and split off code into R_AddSurfaceToList