Refactored static files to make it work in all browsers