Updates command line interface and add tests