Added support for arbitrary lists and also structures.