Refactoring to a formatter class and removing old parsing code.