Improve browser compatibility with FF and IE

Most features are now consistent (but slower on FF and IE)