Move environment message logic into a builder class.