Fix more tests, improve repr() functions for various Python types.