Adding http-debug support to tests.
Some small test cleanup.