Some refactoring and other mogrations.