[WIP]: Fixed export in lib/encode.js