Applying current filters to the export feature.

fixes #477
Export unit tests added.

see #477