Added serialization of large classes and arrays.

TODO's:
* Arrays don't serialize properly when within classes.