Moved mixins to dedicated module. Added unique handling for Affiliation table.
more robust parsing and added role
some edge case handling