Update spigraph.c

Reformatted a bit. Some clean up comments needed.