Editor: reduce scope of some functions.