Rename type -> mode