Implement proper string parsing