Switch to New/Safefree
Remove lots of prime-related functions that aren't used
Merge lots of XS functions for memory savings.