Refactored code: removed comments, handlers now use addLogs to add logs