Docopt cli

I did a bit of refactoring, and fixed a bug. I'll get to the rest of testing today hopefully.