Make state machines statically allocable

Since we really want to avoid dynamic allocation, it was needed to make
the state machines statically allocable.