Refactor vcs_message functions.