Fixed duplicative CSV reading code