javadoc added, warnings fixed