Added javadoc and made some refactoring