Cleanup some monkey patching.