Loops, Methods and Classes HW - Refactoring