Comments added to explain the objective of the file and to describe the parameters. Code commented and overall readability improved.
Unnecessary code removed.

Signed-off-by: sachin <sachinbhat.as@gmail.com>
Objective of the file has been detailed and the mechanism too achieve the same has been explained. Code commented appropriately and indented to improve readability