Added BIT_STATES and other debug things.