DOM listener.
Refactoring.
Tests work! No more double click though.
Working tests finally.
Merge branch 'domlistener'