[TASK] Refactor command dispatcher