Added export all and export selected functionality