Merge Brian's changes (the big one)