decoupled the core from the gui, broken atm.