Converted most Groovy files to Java to make the project more useful as sample code.