fixing some bad refactors, adding more support for IE8. Also updated readme and test.html