Refactor the WordLadder again