Improvments and complete javadocs