implement html5 new interface
merged Gary's newUI and fixed conflicts