Adding better script termination handling (WIP). Adding more abstraction of get_locator_obj (WIP).