Added hashset to track recent messages. Should have solved message dropping issue
Refactored and Static Code Inspection