Hopefully final commit. Fixes #11, Fixes #10, Fixes #6