Added thread listener.
Updated both client and server.
Added comments on source code.