Adding support for complex tag structures