make use of std_Math_min
Convert products calculation to save one iteration
Convert while to for loop
Adjust comment and variable name in ComputeAllSliceBounds()
remove dead code and move comments around