Add support for FireFox, fix a few FF issues
Tidy