Switched to 'words' functions.  Doesn't appear to be faster...
Possible slight speedup, also fixed incorrectness with mul_mod due to lack of paying attention to the carry bit.