split into modules, added docopt stuff (damn i love docopt)