Added support for lists and nested lists