Simple code refactoring.