Modified scaling.

Fork of PID by Aaron Berk