Update demo code and setupHandlers method