Tabs and memory leak fixes.