Added from aaron's branch.