It's a little hard to tell what changed in this file and what was simply moved around.
Consider breaking the refactor into a separate commit from the new feature code.