default listeners as class and some fixes to client