Removed deprecated code, which was overriding apple internals.
Fixed deprecated method calls.