Added JavaDoc comments and synchronized access to notes