For ENG-4709, do a little refactoring to use fewer magic numbers