Pull request for all the remaining patches, including the new performance monitors.

Is this intentionally a non-const pointer? Constructor as well.