added a global clear function
Last-minute demo fixes