remove leftover commented code
fix memleak