many small fixes, refactorings and cleanups.
Merge branch 'master' of github.com:appleseedhq/appleseed