some updates to api and command line interface, almost done with docs