Added the main driver and various helpers to do the work.