fixing bug that caused send to report error for wrong reason
minor makefile fix
moving lib out in order to use common functions for talker-listener