test(machine): Add machine.stackState tests
chore(logging): log initial Machine state
fix(machine): stack machine states in the correct order

Fix #122