Rework mouse events, simplify html