Merge branch 'version-3'
Some refactoring

Did some refactoring, some test still fails on IE9
Added test/index.html to test on VirtualBox's IE
Added trim capability for IE8 + small refactoring
Fixed .trim problem in IE8 tests (jumps tests on IE8)
Merge branch 'master' into version-3