Checked the operation. Added JavaDoc. Solved several warnings.