Made wholesome changes for logging and variable refactoring across modules

Made wholesome changes for logging and variable refactoring across modules