Moved command line interface into __main__