Fix many tests and remove obscure dependency.