code cleanup and started working on persistant reader-client connection