Remove empty lines
Fix memory leak