Refactor module header into its own module, and remove count tracking fields from the Module itself since it uses arrays which keep track of their length.