Fix up locator.py and start fixing tests for it