Code refactoring and adding tcp messages to confirm sdp submission