Add a deinit method to public API

(needed when we do no call run)
Add test game state stack