Improved the conversion script.