Prime and PrimeSMP cleanup