Include another threaded message detection case
Refactor code