Number reimplementation and associated tweaks.