Extracted a base class.