Fix for loops breaking IE8, update test suite to run in IE8 (use 'className' instead of 'class'), serverside tests (api-test.js) updated to match.