Docopt and some other improvements