updated JavaDoc comments and change minor things