Refactored socket listeners
Refactored socket listeners