Remove API deprecated in OS X 10.7
Remove unused variables
Remove deprecated API
Remove unused variable
fix variable type mismatch
Ensure we're releasing allocated memory
No need for `continue` after @throw
Update build settings