Improved pipeline for incoming messages

Fixes #1431