Fixes #31, fixes #34, fixes #35