Moved pointer arithmetic into message building functions.