Refactored the base.