Move conversion to external JS and not ES API