Use getopt for fancy command line interface
Merge master
Merge branch 'master' into realsiman