Added some profiling stuff.