move initial frame data to seperate variable
Consolidate the two pieces of state into a single atom

This helps readability of the code by knowing there is only one
  variable that contains the state and only one variable that
  can be mutated.

This means if you refactor the code into multiple files you
  only have to pass this one variable into the functions
  from the other file.
add in editor.set() from Matt+Fix