Updated and commented versions.