Refactoring: Separate the concerns of recognizing a message and processing it.

This allows to later have different MessageHandlers, e.g. having another handler that processes pinBuild messages.