Leaks corrected and UnUsed files removed

Following changes have been made:
1) Leaks have been corrected.
2) Unused files have been removed.
3) Unused code have been removed.