Update MainTDB to run from the command line.