ranks added to export modules and improved rank handling
Merge pull request #6 from SimonWaldherr/master

v 2.0