Worked on debug code and tests.