Patcher and test code reworked. Now moving on to integration.