taking out all the profile/timing stuff, so that it is ready for use without debug, I am still unsure about how to do the profiling stuff, it should in theory be separate from debug as debug is liable to introduce slowdowns. Perhaps it can be a similar usage pattern as debug and can be enabled at will