Refactoring for teamcity_messages module