Reworked export system and added JSON export