Added support of nested elements