Modify encoder/decoder for actual layout of how they work