Lots of boilerplate for gui.