fix "open"

Open needed more information - it is no longer enough just to know an
object to build. Because we end with a composite object that the window
shouldn't know about, we instead pass the window the raw data and a
factory method. That way the window can use the factory method again
later when it opens a new file. Eventually we might pass in something
more complex, like a builder object, so the user can customize / edit
the element factories.