improved html functionality, fixed data/analysis mode attribute bug