Refactored controller base class