Fixed compiler issues

- Fixed compiler error when not TargetCocoa.
- Removed unused vars and method params.