Improved rendering of set defs and other minor changes