Add 'def' and 'set', improve stability