Fully implemented the recursive listening functionality.