Factor out editor actions into separate file