refactor : optimize imports + replace mutable argument (a list) in StateMachine constructor