Quite a few fixes and unit tests for reed-solomon added