Refactor decoding to package for reuse.
Fix for package refactor.
Fix FastMag.
Refactor parsing into packages for reuse.