Change Duplex demo to use Runnable class