Refactored code due to https://github.com/Gomasy/update_name/commit/de4b546d2330fa3efe266c1adc56b976bf7116c5, https://github.com/Gomasy/update_name/commit/fdeadc16950f026d683abba9f2a0fb05c3eea266, https://github.com/Gomasy/update_name/commit/459d06b9902349efb4422a009f6418cb0860b9ce