Move helper functions to bottom
Add partial Firefox compatibility
Refactor a bit
Use mousewheel for cross-browser compatibility
Reorganize JS
Adjust controls