Added format_name method and tests.