Update tests
Complete encoder/decoder