Perform general cleanup. Move function out of main program. Change modified dates on files to reflect changes.