Memory leaks fix #1 (some additions)
Merge pull request #8 from arassadin/master

Memory leaks fix #1 (some additions)