Create Encoder class.

Change getOpCode, getType and getOperator to getByte, to better reflect
the return value of the methods.