Refactoring and enhancements for importing data into the database, including JSON importing capabilities for snapshot data.