Lots and lots of bug fixing and development.

More than can be counted... Issue #1 is not fixed, but improved with
this commit.