Modular framework for patching in Max