Remove some debugging and add to tests.