Refactor manage_fraction.inc