Code for eliminating redundant locations.