This fixes #24 and also closes #23, resolves #10 as well as issue #9