Added some state stuff, gui stuff