Fixes #7 and more