Fixed #10, but not in a clean way (duplicate code)

I fixed issue #10 (direct image access broken), but used duplicate code to do it. The front end application needs a refactoring to avoid technical debt and set the stage for undo/redo support.