Better syntax detection