Cleaned up some of the numeric code.
Especially by splitting up some of the really long lines into multiple lines. Fixed a few small odds and ends.