Refactor some.