move editor to seperate file