Merge branch 'master' into gh-pages
Wrote a little polyfill function to get things working in firefox