Lots of improvements to modcomp.