Added start of encoder, set up encoder tables