Cleaned up the debug code a little.