Improved definition handling