Rewrite to move to command line based app