Minor reorganisation and addition of comments.