Added some javadocs
Fixed clazz check