Finishing touches to refactor.