Cleanup convert.js and add base64 test