Command line script

Fixes + documentation