Create functions for handling intermediate, final and partial message types.