performed a cleanup based on the orig tree