Number formatting and a general clean-up and improvement of code.