Additional refactoring, cleaned up the text formatting and moved it to the Stat class.