move type, typeof, mode to container