base gui stuff and cleanup