Use more generics
Set ping interval back to 60 sec and fixed session/ws-related bug