Refactored how data is imported