Added support for 4 parameter easing functions.

Also cleaned up many lines of code or comments that were too long.