phase I refactor complete.