Updated tests to pass in firefox and improve in chrome and phantomjs.