Removed invalid comments and some refactoring, javadoc adding