Added Encoded, Decoder, and made Entity more portable