Merge pull request #14 from dkorolev/master

Purge() + better Resume() + more tests.