Storable instances for State and Quarter
Read/write state to/from bytestring.
More tests, bug fixed