Feature/optimize scheduling unattached messages

The first commits are only about code cleaning and adding a PrintLogger for testing managers. The actual optimisation is in the last commit.