Some minor fixes.

program almost ready