Random other changes.
Fixes #10, fixes #11, fixes #12 and fixes #14