HW2: refactor to extract 3 move methods (in preparation for HW3).