Added function definitions.
Added functions to remove punctuation and sort by value.
Revised sorting function.