Updates to control testing and bugfixes to BitWord and StateMachine.