Refactor

Same list of cleanup and refactoringing as before, but applied to my "new" MotionEffects branch.