Proof-of-concept solution to issue #7 (note massive behind-the-scenes API chagnes on the branch).