Initial commit of file after changes from version submitted by Terry MacDonald.