Documentation and clean-up

Added docstrings to most exposed functions and types. Also, removed
the unused/unexported packing-into-byte-array stuff (there was no reader
for byte arrays anyway).