Added a debug class to allow performance monitoring