Memory leaks
Merge pull request #24 from moneytree/memory

Fixed memory leaks