Fix calculation of interaction orientations.
Add some comments into export.