Misc JS fixes, Firefox CSS fix
Merge pull request #3 from avaly/master

Misc JS fixes, Firefox CSS fix