Added TODO. corrected resource leakage
Reformatted code.
Merge pull request #1 from pkvprakash86/master

Reformatted code