More refactoring of locator_obj code (WIP).