Added comments, fixed typo and added few variable

Added comments, fixed typo and added few variables that has to be passed
from command line