Added javadocs to improve code quality