this should address all of @aurimasv 's comments, except, of course, for the nested html/xml markup