Added the main driver routine (forgot in first commit)