Improve parsing rules