tidy up of gui class