shell sort code cleanup