move function to public to improve tests
improve tests and check for memory leaks
add example.ion file for encoders, including protocol proposal
improve documentation