Add ConsoleFactory and change command to call it