Improvements. Fixes #1