Started implementing command line api, not finished