Cleanup.
Cleanup. Putting more cast if statements trees into alphabetical order.
More cleanup.