Merging the encoding table in. 

 This has some scoping ramifications.  Needs extra review and testing.

This changes some scoping considerations.  I tried at present not to tighten up scoping however there were a few areas where this was difficult and additional testing/review was warranted.

There are a few specific changes that had to be made.  The initial table is now a locally scoped table in the main module, and the encoding table is copied in.  I won't merge this until further testing shows it is safe or it has more review.