Adding comments and javadoc