Add command line arguments feature, correct bug for hierarchical examples.