Resource management

Closes #22
Looks a bit ugly with all those `unwrap()` things (cleanup PRs are welcome!), but functional and safe from the user perspective. Also - `Storage` needs tests.
I can live with these for now - better we get rid of the memory leak.