updated API to allow for call as a module function
small changes
updated doc strings and command line run features
fixed typo in doc string