Added actual patching code... yet to test.