Refactored record_locator code for Barke bhai.