added releasing of memory, gitignore update