Fixed Memory leaks
Converted functions to Apple coding conventions (NSError with non-void return value)
Remove some other warning