Fixed some level 4 warnings in VS2013

Added casts for the simple stuff like implicit type narrowing.
Disabled the constant conditional expression warning.