Improved some comments in get_local_name() and improved the