Refactor PartOne.java