Moved type specific computation outside of the bignumber library, and made more style touchups.