Hooked up debug and profiling flags.
Updated docs.