Importing Bewest's changes into BA's repo.