Lots and lots of gui logic.