I think this is finally working, GUI and all
Need to write some tests