Add cool utility code from EE3.