Clean up convert.js, add tests