Prototype with multiresult

Provide own implementation of issue #20 on top of prototype commit, as well as some test improvements, and allowing for null as an unwrapped result.