Better debugging and cleanup.