Use getopt for fancy command line interface
Merge master