added base controller

Extracted base controller from cqrs controller
cleanup old code
minor refactoring