bug fixes, could use a little refactoring, expanded string encode/decode examples