Simplify string parsing