Added optional and vector properties to autogen encoding/decoding (closes #112)