Merge clean up code.