TRUNK-3926 updated messagecode to make it more readable