Fix up warnings.
Lots of fixes to ray casting.