Line parsing utils