Don't need to take the frequency table.
More fleshing.
Fleshed out first unit test, core dumps though :-(
Added decode table helper.