Final version of converter script.