Done. I rebased this pull request against the current master and then issue pull request #342. You can probably just close this pull request in favor of that one.