Added Dialog rendering code