Correct error in compatability layer
Begin modularizing GUI

This version, while technically functional, still uses some global state
and tightly-coupled componenets.