Web Storage

This PR implements the functionality detailed in issue #183 while also fixing some bugs at the same time.