Add readline support.
Add -g command line flag.
Note readline support.
Reorganize.