Moved common funcs into path_chooser_common.py