Cleanup and debug traces