rework control structures and add shebang preproc line