BAMPFA-79: Some minor refactoring and comment editing.