release shell reference after shell is leaving
make tests more stable
Merge pull request #37 from rainu/issue-32-memory-leak

Issue 32 memory leak