Fix non-existing getPrefs()
Fix code formatting a bit (to make easier to understand it)
Fix code formatting
Fix wrong stylesheet URL
Do not register non-existing listener
Merge pull request #24 from janodvarko/issues

Soleves so many issues with the original author's codes