Fixes #18 Fixes #12 Fixes #8