Changed on connect action to ping on 001 receive
Removed redundant code
Small code cleanup