Refactor data loading import