Working through the various edge cases.