Replaces awful connect type system with bitflags