Added support for complex data objects.
Removed debug code.