Refactoring how parameters are retrieved from message struct.