Support for name resolution. Various cosmetic changes