Add serializer for Option and make event.value.value.value only .value.value

Also some reformatting, but in a separate commit.