leveleditor cleanup (DRY mode)