Somewhat cleaned up the beginning of the SparseNet script.  It'll still have to be cleaned up more, but this is a good step.