Adds the first battery of unit tests, promotes minor fixes and adds support cross browser.