Corrected indent issues and memory leak.