update and organize gui code

Also added a tab for favorites but was unsuccessful in adding code to
display a clickable table
idk  how to do it