Removed an unused swap function.