Reformat code. Fix collection-like node creation to cast to Iterable and consider arrays. Original pull request: #169.