Updated and rebased.