Cleanup and debugging.