Merge "Add garbage collection hooks" into klp-dev