Reorder functions to be in alphabetical order

File should be a bit neater now.  Also cleaned up some excess
white-space.