Fixed storage of UI state

Fixed proper storage of state
Using storage to revert state to stored postions
using previous state to minimize after maximize