Source code reformat
Adding javadoc
Removing some warnings
Some renamings