Refactored to only run once per tick rather than every message.
Moved the message application to after the analysis so we properly check everything at the end of the snapshot.