No real changes, this is just a refactoring in preparation for the next commit. This commit is best viewed with --color-moved git option.