Reduced using Java library classes.

Reduced using Java library classes.