This should solve #12 (closed).
Note that this is based on yet unreviewed (and unmerged) branch in !6 (merged).