minor code cleanup in SparseNet script.