Replace deprecated code, fix JavaDoc issues