All events start with a single click

* Refactor the code so that all events start with a single click.
* Remove some jQuery call when not need.
* Remove partially duplicated function to replace mi element with mn.