Replaced all comments with logger for readability