Bugfixes and Javadoc comments