Refactored editor lookup to solve #841