Added soments, javadoc and some final changes