Remove some unnecessary casts.
Fix 80-column and other odd formatting.