Fixes march 22

a couple of modifs for speed, getting into the new code base.

The suggestion to move encoders and decoders into shared vars is something I stand by, but the way I did it... not so much. Suggestions welcome.