Fixed compiler and static analyser warnings.

Added cast to silence compiler warning.
Removed unused ivar.
Updated project settings.