Polystate: Composable Finite State Machines