fix all errors, now all sample html files work
dec 11 2013, xiaochuan yi