Change trapdoor bit flags into enum