Minor edits and assertion improvements.