Slava, please use destructive assignments in map operation in case of expression being not simple one
map { case (href, links) => 

Expressions like this is really hard to read. especially with _._1