Many major changes. See comment.