More tests and debug statements.