Fixed testing and js problems