Changes in Serialization API

Finished changes in the serialization API. Added support for multi
dimensional arrays.