Creates and applies patches to datastructures