Updated line parsing