Fixed memory leaks
Began version 0.9.5