moved files from SGE_utilities
minor rewrite (new string formatting, etc.)