remove redundant optimization from EventHandler, improve DOM.parseTemplate