Removed unused duplicated code.