Move Header.java and rename to Header.groovy.
Move HeaderCollection.java and rename to HeaderCollection.groovy.
Groovify each and eachWithIndex. Remove unused imports.
Remove unused java classes.