Cleaning up solution code, and fixing statistics generated.