Command logic and startup logic