Refactored to split file into parts and parse with threads