Cleaned up some of the patches for readability