Ported code to compile with Java 6

Ben,

Here's the pull request for the java 6 changes that Jason mentioned.