Clean up parameters; allow selection of easing function