refactor: reduce complexity in metaphone