Added correct listener.
Merged in refactoring.
Fixed canvas height issues.