Cleaned up at the API level

Got rid of applyPatches - now only exporting patch
Main no longer has explicit import lists, and does the folding
explicitly instead of using the no longer existing applyPatches