Refactor AutoConsoleCommand