Some changes in variable names for more convenience

and a few comments to code