Remove superfluously logic from the child wait loop, add deeper comments