Refactoring to remove cleverness.