Implemented line reading and basic cleaning