cleaned up connectListener structure