Correct JavaDoc errors and refactor validPointers