Improvements to code and javadoc-comments