some file modes are changed
some errors fixed
some simplifications to exec.py