Code cleanup.

Minor code cleanup to have cleaner code and correct use of the Java Operator API.