Added debug and profiler stuff.