Added a basic state machine class in Lua.