Refactored common functionality.