Refactor update_server_xml as it's reached the rubocop 25 lines limit