Merge cbrightsci fork into main project.

Make enums for these case #s--magic numbers are bad.