Refactor command classes