A few improvement

* add command line options
* import external files