Change bitflags to use bitshift instead pot