Redo invmod etc. XS parser.  Fixes leak, makes 848 bytes smaller