working on separating out editor code