Final version, tested.