Refactoring: Introduced common command handlers initialization to reduce code duplication