Added OOP wrapper + added server connection lost handler (on client side)