Fix storage bug where it was saving data under the wrong key.

- Also fix some bad indention.
Ensure the panel form gets reset every time its opened.

- Not every field was being reset after use, leaving it in a dirty state
  for the next time.
Save an API hit when the icon is clicked on a blank tab.
Update with trunk and resolve conflicts