Complete functions related to bit flipping. All of them. Also remove
reference to helper function in tests.