Improve simple directive parser