Adds decoding of option values, and some more tests.