Fix more failing tests and errors