Refactor ConnectCommand.
Added ConnectCommand spec.