Refactor to remove the remaining vars.