externalise locator logic in own lib

4 jobs for master in 5 minutes and 21 seconds (queued for 1 second)