Move the Beast decoding code out of the library for now.