Fixed deprecation warnings for iOS 7 and above

Also, fixed a bug in the Levenshtein algorithm that caused random crashes