Removed some merge duplicated code