Moved patched code into separate namespace to avoid collisions