Cleaned up Prim by a lot. Still works with regards to my current tests. I'm going to run them on a Linux box and run diffs on the outputs to see if anything is broken.