Bit of work towards #831, add a currently empty handler for connectionDetached and add a handler for new connections