Replacing script file with function file.

Replacing script file with function file.  After checking, there was
never a script to begin with; I started directly with a function, so
I've updated the filename accordingly.  Also made modifications to the
function; nearly ready to turn in.