Wip mds sessions

Nested list comprehensions always strike me as a little "too clever"... for the sake of whoever has to understand this after you, could you split this up?