simplified (re)connection logic by moving polling inside PA server
test fixes
fixed some glitches