More general refactors.