Rearranged functions so that they are in alphabetical order