remove most left recursions