Added option to return matched structures.