Beginning of code for finding and eliminating unused locations.