Updated the gui and added a swap dialog