A little refactoring and notes for more to do tomorrow.