Added basic export functionality and improved the concept