Backport of BigInt removal and speed / stability hacks from 2.x series to a non-mop version