Fix JavaDoc typo and trim code