Refactoring / cleanup.