Flatten roles using traversal strategy

Fixes #166

ping @arekkas