Extracted calculation of min/max value range to function.
Extracted calculation of min/max value range to function.

Rearranged some aspects of the render function for clarity.

stanlry/smoothie,junlapong/smoothie,mahnunchik/smoothie,stanlry/smoothie,junlapong/smoothie,mcanthony/smoothie,mcanthony/smoothie