Added smooth_join, dirs_match and get_dir_currently_running_in