More source fixes to remove warnings (mostly explicit casts)
Added new math header missing from previous commit.