rewrited all tests to qunit
removed unused code