Prime Patch 1

Added some cleanup code to the Prime class.