Minor cleanup regarding memory management. bug fix: memory leak.
Unnecessary dynamic memory usage.