Comments and minor fix

Adding some comments and make a minor fixes
remove loging