An experimental branch to see if changing flags to use bitsets instead of ints is helpful