Extract common behavior to base classes