Stability improvements

Fixes #20