Refactor
Add logging overload protection change
Add comments