removes 2 useless memory allocation
Merge pull request #124 from Hakim-F/memoryImprovements

Memory improvements