added advanced link attribution. Also added ids to some parent elements that most likely have ambiguous children.