Cleaning up comments/dialogs/functions

Just added comments, moved the dialog to the top of the script (as in
the newer ones), and modified a few random functions that had been
replaced with FUNCTIONS FILE functionality. Doing this and committing it
in advance of additional changes about to be made.