Some boilerplate code for working with GUI's and Data.