Fixes #23 Fixes #22 Fixes #18