Refactor many things.