Merge from Brian's fork.