CXX-158 improvements based on Andrew's comments