Fixed ValueType support to comply with the new Code Generator API.
Added support to externalize Serializables.