Improved debug thing