Tab state saving kinda working

One of the tabs has bad HTML formatting though.
Should fix that and clean up the HTML AGAIN