Add editor specs, refactor