Rewrite the command line application to actualy use the new code