More code refactoring.