Serialization options support

Closes #404