Initial refactor complete.