Code to parse lines