Code cleanup and arithmetic testing.