Updated to use moved maximum and minimum methods
Removed unused imports