Added docopts, upgraded main switching accordingly - works much better