DOH-based tests and some bug fixes done while testing.