refactor FractionProblem to reduce complexity, extract fraction HTML formating from Fraction class