Update prim.cs

Cleaned up some sloppy code