Added support for serializing enumerables and added support for NoTypes flag.
Fixed bugs.