Javadoc added and compatibility changed to Java 6