Fixed some classes to be compatible with Java 6 specifications.