Formats SubMessage class. Adds comments and documentation for SubMessage class.