Added some necessary bits to namedef and listdef
Used setkeys in addfield in order to set defaults