gave stages more descriptive names
renamed methods for clarity
Refactored names for clarity
Switched to using MathUtils.capValueMinMax
used capValueMinMax
simplified lines
renamed parameter for clarity
removed pointless variable
bugfix and simplified printing