Made code backwards compatible with earlier versions of Java and cleaned
out debug messages.