Changed license
Extracted command-line logic to a file
Added docopt to handle command-line args