Refactored soda encoding/decoding, minor renaming