Verified signal handler

And deleted find_short_path function.