Improved cons method switching "switch" syntax for a nested if
Fixed error in cons that Strings not sorted correctly