I think this works. Needs real-life testing =) Fixes #6 for now.
Merge pull request #8 from Minus-7-Games/saveStates

I think this works. Needs real-life testing =) Fixes #6 for now.