Adding Javadoc and removing unused functions
Merge origin/master