Remove big bunch of compiler warnings with explicit cast to int

Just a minor PR to get rid of about 35 compiler warnings. _clang_ complains about loss of precision in most cases where ```NSInteger``` is used as an ```int``` without explicit casting. I just went through the warnings and added the casting so that TODO ```#warnings``` are still visible in Xcode's Issue Navigator.