Fix to deleates and better test

Fixed delegates that where garbage collected and improved test echo
server