Changed arg signature for public.define. Updated demos accordingly.