Refactored ordered set, string and hash