Refactor editor UI to use array of objects