Refactor command manager classes