Debugging cleanup improvements