Fix imports and docopt usage