Clean up and comment convert.js