Added client listener

Added the client listener and serialization methods