Finite State Machine Library