Unsafewindow again

PRs are piling up! This one's on top of the get rid of localStorage stuff.