Resolving conflicts of earlier change set.

Resolves the conflicts from #6 and leaves (most of) the remaining changes. (Feel free to reject if you didn't want these changes.)