Mostly fix merging....except some things still appear to be missing in some cases.