Several changes, to be rebased.