Made some progress on issue #1.